export

ifeq ($(SRC),)
SRC:=$(PWD)/src
endif

SRCS:=$(subst :, ,$(SRC))

all: debug

debug: debug_dynamic

release: dynamic

debug_dynamic: ./dynbuild.pl
	./dynbuild.pl DEBUG $(SRC) ${OSE} $(BUILDDIR)
	TARGETTYPE=debug $(MAKE) $(SRCS)

dynamic: ./dynbuild.pl
	./dynbuild.pl $(SRC) ${OSE} $(BUILDDIR)
	TARGETTYPE=release $(MAKE) $(SRCS)

sleeptest:
	SRC=$(SRC):$(PWD)/test_impl $(MAKE) debug

clean:

$(SRCS):
	$(MAKE) -C $@ post$(TARGETTYPE)

.PHONY: $(SRCS)

